package com.macro.mall.config;

import com.baomidou.mybatisplus.annotation.DbType;

/**
 * @author ：小海
 * @dete ：2021-04-03 18:39:05
 * @Describe : mybatis-plus代码生成器配置类
 */
public class GeneratorConfig {

    /*数据库配置*/
    /*MySql*/
    public static final DbType MYSQL = DbType.MYSQL;
    public static final String MYSQL_URL = "jdbc:mysql://192.168.3.210:3306/"+GeneratorConfig.LIBRARY_NAME;
    /*8.0*/
    //public static final String MYSQL_DRIVER = "com.mysql.cj.jdbc.Driver";
    /*5.0*/
    public static final String MYSQL_DRIVER = "com.mysql.jdbc.Driver";

    /*SqlServer*/
    public static final DbType SQL_SERVER = DbType.SQL_SERVER;
    public static final String SQL_SERVER_URL = "jdbc:sqlserver://localhost:1433;DatabaseName="+GeneratorConfig.LIBRARY_NAME;
    public static final String SQL_SERVER_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";


    /*oracle*/
    public static final DbType ORACLE_SERVER = DbType.ORACLE;
    public static final String ORACLE_URL = "jdbc:oracle:thin:@localhost:1521:"+GeneratorConfig.LIBRARY_NAME;
    public static final String ORACLE_DRIVER = "oracle.jdbc.OracleDriver";


    /*库配置*/
    public static final String LIBRARY_NAME = "guli_edu";

    /*数据库账号密码*/
    public static final String USER_NAME = "root";

    public static final String PASSWORD = "594200";



    //表前缀
    public static final String MODULE_NAME  = "edu";

    /** 包名：controller */
    public static final String PACKAGE_NAME_CONTROLLER = "controller";

    /** 包名：service */
    //public static final String PACKAGE_NAME_SERVICE = "repository";

    /** 包名：service */
    public static final String PACKAGE_NAME_SERVICE = "service";

    /** 包名：service.impl */
    //public static final String PACKAGE_NAME_SERVICE_IMPL = "repository.impl";

    /** 包名：service.impl */
    public static final String PACKAGE_NAME_SERVICE_IMPL = "service.impl";

    /** 包名：model */
    public static final String PACKAGE_NAME_MODEL = "entity";

    /** 包名：dao */
    public static final String PACKAGE_NAME_DAO = "dao";

    /** 目录名：xml */
    //public static final String DIR_NAME_XML = "mapper";

    /** 目录名：xml */
    public static final String DIR_NAME_XML = "dao/xml";

    /** 文件名后缀：Model */
    //public static final String FILE_NAME_MODEL = "%sEntity";

    /** 文件名后缀：Model */
    //public static final String FILE_NAME_MODEL = "%sEntity";

    /** 文件名后缀：Dao */
    public static final String FILE_NAME_DAO = "%sDao";

    /** 文件名后缀：Mapper */
    public static final String FILE_NAME_XML = "%sMapper";

    /** MP开头，Service结尾 */
    //public static final String FILE_NAME_SERVICE = "MP%sRepository";

    /** 去除I，Service结尾 */
    public static final String FILE_NAME_SERVICE = "%sService";

    /** 文件名后缀：ServiceImpl */
    //public static final String FILE_NAME_SERVICE_IMPL = "%sRepositoryImpl";

    /** 去除I，文件名后缀：ServiceImpl */
    public static final String FILE_NAME_SERVICE_IMPL = "%sServiceImpl";

    /** 文件名后缀：Controller */
    public static final String FILE_NAME_CONTROLLER = "%sController";

    /** 逻辑删除字段 */
    public static final String FIELD_LOGIC_DELETE_NAME = "delete_status";


    /** 乐观锁字段名 */
    public static final String FIELD_VERSION_NAME = "version";

    /** 作者 */
    public static final String AUTHOR = "Xiao Hai";

    /** 生成文件的输出目录 */
    public static String PROJECT_PATH = System.getProperty("user.dir");

    /** 输出目录 */
    public static final String OUTPUT_DIR = PROJECT_PATH + "/src/main/java";

    /** 模板引擎。velocity / freemarker / beetl */
    public static final String TEMPLATE_ENGINE = "velocity";

    /** 是否支持Swagger，默认不支持 */
    public static final Boolean SWAGGER_NO_SUPPORT = false;

    /** 是否支持Swagger，支持 */
    public static final Boolean SWAGGER_SUPPORT = true;

    /**逻辑删除字段名*/
    public static final String DELETE_FIELD_NAME = "is_deleted";
}
